#!/bin/sh
#|-*- mode:lisp -*-|#
#|
exec lilu-script.ros -- $0 "$@"
|#

(ql:quickload :lilu-debugger)
(ql:quickload :lilu-emacs)
(ql:quickload :bordeaux-threads)

(defun test01 (d1 d2)
  (lilu-debugger:with-debugger (d1)
    (lilu-debugger:with-debugger(d2)
      (format *debug-io* "active debugger: ~A~%" lilu-debugger:*debugger*)
      (error "myerror1"))
    (lilu-debugger:with-debugger(d2)
      (setf lilu-debugger:*debugger* :abort)
      (format *debug-io* "active debugger: ~A~%" lilu-debugger:*debugger*)
      (error "my2"))
    (sleep 0.5)))

(lilu-debugger:enable-debugger)

(test01 :abort :abort)
(test01 :abort :emacs)
(test01 :emacs :abort)
(test01 :quit :abort)
(test01 :quit :emacs)
(test01 :abort :quit)
(test01 :abort :none)
(test01 :none :none)
